/* CSS reset */
* {
    box-sizing: border-box;
}

*::before, *::after {
    box-sizing: border-box;
}

* {
    margin: 0;
    padding: 0;
}
ul, ol {
    list-style: none;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    max-height: 100%;
}

/* background:grey 之后，
1、只有红色区域变色 
2、整个页面背景变灰色

正确答案是第二个
*/
/* site style */
body {background: #eee;}

.global-header {
    margin: 20px;
}

@media (min-width:500px) {
    .global-header {
        margin: 60px 0 100px 0;
    }
}

.search-form {
    /* border: 1px solid black; */
    margin: 20px 20px;
    display: flex;
    justify-content: space-between;
}

@media (min-width:500px) {
    .search-form {
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
        /* 当元素有最大宽度或者固定宽度的时候，可用margin:0 auto 
        ，需要写成上述的形式，以免覆盖别人的样式 */
    }
}

.search-form > input{
    width: 100%;
    margin-right: 10px;
    height: 40px;
    padding:0 10px;
    border: none;   /* 删除input box默认的border */
    border: 1px solid #ddd;
    border-radius: 4px;
}
.search-form > button {
    white-space: nowrap;
    padding: 0 28px;
    border: none;   /* 去除button 默认的border */
    border-radius: 4px;
    background: #0282B9;
    color: #fff;
    font-size: 16px;
}

.global-main  {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}



.site-list {
    /* border: solid black 1px; */
    margin: 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    /* border: 1px solid red; */
}

@media (min-width:500px) {
    .site-list {
        margin-left: 0;
        margin-right: -25px;
        justify-content: flex-start;
    }
}

.site-list > li {
    
    /* border: 1px solid blue; */
    margin-bottom: 10px;
}

@media (min-width:500px) {
    .site-list > li {
        margin-right: 25px;
    }
}

.site-list .site {
    /* border: 1px solid aqua; */
    width: 160px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    background: #fff;
    /* border: solid 1px aqua; */
    border-radius: 4px;
    padding: 20px 0;
    position: relative;
    cursor: pointer;
}

.site-list .site > .logo {
    width: 64px;
    height: 64px;
    /* ---- */
    display: flex;
    justify-content: center;
    align-items: center;
    /* ----居中布局———— */
    font-size: 64px;

}

.site-list .site > .link {
    font-size: 14px;
    margin-top: 4px;

}

.site-list .site > .close {
    position: absolute;
    right: 10px;
    top: 5px;
    display: none;
}

.site-list .site:hover > .close {
    display: block;
}

.site-list .add-button {
    border-radius: 4px;
    background: #fff;
    width: 160px;
    /* border: 1px solid #eee; */
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 20px 0;
}

.site-list .add-button .icon{
    width: 56px;
    height: 56px;
    
}

.site-list .add-button .text{
    font-size: 14px;
    margin-top: 4px;
}

.site-list .add-button .icon-wrapper{
    /* border: 1px solid red; */
    width: 64px;
    height: 64px;
    display: flex;
    justify-content: center;
    align-items: center;
}